#ifndef MENUMANAGERAPI_H
#define MENUMANAGERAPI_H

#include "Entity/Menu.h"
#include <QObject>
#include <QMainWindow>
#include <QtNetwork>
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <Utils.h>
#include <config.h>

class MenuManagerApi : public QObject
{
    Q_OBJECT
public:
    explicit MenuManagerApi(QObject *parent = nullptr);

    //查询状态字典
    QByteArray* sys_normal_disable();
    QByteArray* sys_show_hide();
    QByteArray* list(QString menuName,QString status);
    //新增修改
    QByteArray* menu(Menu &menu);
    //删除
    QByteArray* deleteById(qulonglong menuId);
    QByteArray* getById(qulonglong menuId);

signals:

private:
    QString baseUrl ;
    QNetworkRequest request;
    QNetworkAccessManager *manager ;
    QByteArray *data = nullptr;
    Utils utils;
};

#endif // MENUMANAGERAPI_H
